#定时任务测试
import schedule
import time
import datetime
import threading

def job1():
    print("I'm working for job1...")
    time.sleep(2)
    print("job1:",datetime.datetime.now())

def job2():
    print("I'm working for job2...")
    time.sleep(2)
    print("job2:",datetime.datetime.now())

def job3():
    print("I'm working for job3...")
    time.sleep(2)
    print("job3:",datetime.datetime.now())

def job1_task():
    threading.Thread(target=job1).start()

def job2_task():
    threading.Thread(target=job2).start()

def job3_task():
    threading.Thread(target=job3).start()

def run():
    schedule.every(10).seconds.do(job1_task)
    schedule.every(10).seconds.do(job2_task)
    schedule.every(1).days.at("20:51").do(job3_task)
    while True:
        schedule.run_pending()
        time.sleep(1)

if __name__ == '__main__':
    run()